<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <div id="app">
        <input v-model="count"></br>
        <input v-model="count"></br>
        <input v-model="user.name"></br>
    </div>
</body>
<script src="./js/vue.js" type="text/javascript"></script>
<script type="text/javascript">
    var va = new Vue({
        el:"#app",
        data:{
            msg:"aaaaaa",
            user:{
                name:"zs"
            }
        },
        watch:{
            /*msg:function (value) {
                alert(value);
                this.msg = value.toUpperCase()
            }*/
            /*"user.name":function (value) {
                alert("sssssssss");
            }*/
            user:{
                handler:function () {
                    alert("llllll");
                },
                deep:true
            }

        },
        computed:{
            /*count:function (){
                alert(1)
                return this.msg;
            }*/

            count:{
                get:function (value) {
                    alert(1)
                    return this.msg;
                },
                set:function (value,oldvalue) {
                    alert(2);
                    this.msg="qqqq";
                }
            }
        }
    })
</script>
</html>